Optimal. Leaf size=176 \[ -\frac {1}{8} \sqrt {1+\sqrt {2}} \log \left (2 \coth ^2(x)-2 \sqrt {1+\sqrt {2}} \coth (x)+\sqrt {2}\right )+\frac {1}{8} \sqrt {1+\sqrt {2}} \log \left (\sqrt {2} \coth ^2(x)+\sqrt {2 \left (1+\sqrt {2}\right )} \coth (x)+1\right )-\frac {\tan ^{-1}\left (\frac {\sqrt {1+\sqrt {2}}-2 \coth (x)}{\sqrt {\sqrt {2}-1}}\right )}{4 \sqrt {1+\sqrt {2}}}+\frac {\tan ^{-1}\left (\frac {2 \coth (x)+\sqrt {1+\sqrt {2}}}{\sqrt {\sqrt {2}-1}}\right )}{4 \sqrt {1+\sqrt {2}}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 176, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.750, Rules used = {3209, 1169, 634, 618, 204, 628} \[ -\frac {1}{8} \sqrt {1+\sqrt {2}} \log \left (2 \coth ^2(x)-2 \sqrt {1+\sqrt {2}} \coth (x)+\sqrt {2}\right )+\frac {1}{8} \sqrt {1+\sqrt {2}} \log \left (\sqrt {2} \coth ^2(x)+\sqrt {2 \left (1+\sqrt {2}\right )} \coth (x)+1\right )-\frac {\tan ^{-1}\left (\frac {\sqrt {1+\sqrt {2}}-2 \coth (x)}{\sqrt {\sqrt {2}-1}}\right )}{4 \sqrt {1+\sqrt {2}}}+\frac {\tan ^{-1}\left (\frac {2 \coth (x)+\sqrt {1+\sqrt {2}}}{\sqrt {\sqrt {2}-1}}\right )}{4 \sqrt {1+\sqrt {2}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 618
Rule 628
Rule 634
Rule 1169
Rule 3209
Rubi steps
\begin {align*} \int \frac {1}{1+\cosh ^4(x)} \, dx &=\operatorname {Subst}\left (\int \frac {1-x^2}{1-2 x^2+2 x^4} \, dx,x,\coth (x)\right )\\ &=\frac {\operatorname {Subst}\left (\int \frac {\sqrt {1+\sqrt {2}}-\left (1+\frac {1}{\sqrt {2}}\right ) x}{\frac {1}{\sqrt {2}}-\sqrt {1+\sqrt {2}} x+x^2} \, dx,x,\coth (x)\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}+\frac {\operatorname {Subst}\left (\int \frac {\sqrt {1+\sqrt {2}}+\left (1+\frac {1}{\sqrt {2}}\right ) x}{\frac {1}{\sqrt {2}}+\sqrt {1+\sqrt {2}} x+x^2} \, dx,x,\coth (x)\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}\\ &=\frac {1}{8} \sqrt {3-2 \sqrt {2}} \operatorname {Subst}\left (\int \frac {1}{\frac {1}{\sqrt {2}}-\sqrt {1+\sqrt {2}} x+x^2} \, dx,x,\coth (x)\right )+\frac {1}{8} \sqrt {3-2 \sqrt {2}} \operatorname {Subst}\left (\int \frac {1}{\frac {1}{\sqrt {2}}+\sqrt {1+\sqrt {2}} x+x^2} \, dx,x,\coth (x)\right )-\frac {1}{8} \sqrt {1+\sqrt {2}} \operatorname {Subst}\left (\int \frac {-\sqrt {1+\sqrt {2}}+2 x}{\frac {1}{\sqrt {2}}-\sqrt {1+\sqrt {2}} x+x^2} \, dx,x,\coth (x)\right )+\frac {1}{8} \sqrt {1+\sqrt {2}} \operatorname {Subst}\left (\int \frac {\sqrt {1+\sqrt {2}}+2 x}{\frac {1}{\sqrt {2}}+\sqrt {1+\sqrt {2}} x+x^2} \, dx,x,\coth (x)\right )\\ &=-\frac {1}{8} \sqrt {1+\sqrt {2}} \log \left (\sqrt {2}-2 \sqrt {1+\sqrt {2}} \coth (x)+2 \coth ^2(x)\right )+\frac {1}{8} \sqrt {1+\sqrt {2}} \log \left (1+\sqrt {2 \left (1+\sqrt {2}\right )} \coth (x)+\sqrt {2} \coth ^2(x)\right )-\frac {1}{4} \sqrt {3-2 \sqrt {2}} \operatorname {Subst}\left (\int \frac {1}{1-\sqrt {2}-x^2} \, dx,x,-\sqrt {1+\sqrt {2}}+2 \coth (x)\right )-\frac {1}{4} \sqrt {3-2 \sqrt {2}} \operatorname {Subst}\left (\int \frac {1}{1-\sqrt {2}-x^2} \, dx,x,\sqrt {1+\sqrt {2}}+2 \coth (x)\right )\\ &=-\frac {1}{4} \sqrt {-1+\sqrt {2}} \tan ^{-1}\left (\frac {\sqrt {1+\sqrt {2}}-2 \coth (x)}{\sqrt {-1+\sqrt {2}}}\right )+\frac {1}{4} \sqrt {-1+\sqrt {2}} \tan ^{-1}\left (\frac {\sqrt {1+\sqrt {2}}+2 \coth (x)}{\sqrt {-1+\sqrt {2}}}\right )-\frac {1}{8} \sqrt {1+\sqrt {2}} \log \left (\sqrt {2}-2 \sqrt {1+\sqrt {2}} \coth (x)+2 \coth ^2(x)\right )+\frac {1}{8} \sqrt {1+\sqrt {2}} \log \left (1+\sqrt {2 \left (1+\sqrt {2}\right )} \coth (x)+\sqrt {2} \coth ^2(x)\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.08, size = 45, normalized size = 0.26 \[ \frac {\tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {1-i}}\right )}{2 \sqrt {1-i}}+\frac {\tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {1+i}}\right )}{2 \sqrt {1+i}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.48, size = 590, normalized size = 3.35 \[ -\frac {1}{16} \cdot 2^{\frac {1}{4}} {\left (\sqrt {2} + 1\right )} \sqrt {-2 \, \sqrt {2} + 4} \log \left ({\left (2^{\frac {3}{4}} e^{\left (2 \, x\right )} + 2^{\frac {1}{4}} {\left (3 \, \sqrt {2} + 4\right )}\right )} \sqrt {-2 \, \sqrt {2} + 4} + 4 \, \sqrt {2} + e^{\left (4 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 5\right ) + \frac {1}{16} \cdot 2^{\frac {1}{4}} {\left (\sqrt {2} + 1\right )} \sqrt {-2 \, \sqrt {2} + 4} \log \left (-{\left (2^{\frac {3}{4}} e^{\left (2 \, x\right )} + 2^{\frac {1}{4}} {\left (3 \, \sqrt {2} + 4\right )}\right )} \sqrt {-2 \, \sqrt {2} + 4} + 4 \, \sqrt {2} + e^{\left (4 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 5\right ) + \frac {1}{4} \cdot 2^{\frac {1}{4}} \sqrt {-2 \, \sqrt {2} + 4} \arctan \left (\frac {1}{14} \, {\left (\sqrt {2} {\left (5 \, \sqrt {2} + 6\right )} + 8 \, \sqrt {2} + 4\right )} e^{\left (2 \, x\right )} - \frac {1}{28} \, {\left (2 \, \sqrt {2} {\left (5 \, \sqrt {2} + 6\right )} - {\left (2^{\frac {3}{4}} {\left (8 \, \sqrt {2} + 11\right )} + 2 \cdot 2^{\frac {1}{4}} {\left (5 \, \sqrt {2} + 6\right )}\right )} \sqrt {-2 \, \sqrt {2} + 4} + 16 \, \sqrt {2} + 8\right )} \sqrt {{\left (2^{\frac {3}{4}} e^{\left (2 \, x\right )} + 2^{\frac {1}{4}} {\left (3 \, \sqrt {2} + 4\right )}\right )} \sqrt {-2 \, \sqrt {2} + 4} + 4 \, \sqrt {2} + e^{\left (4 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 5} + \frac {1}{14} \, \sqrt {2} {\left (3 \, \sqrt {2} - 2\right )} - \frac {1}{28} \, {\left ({\left (2^{\frac {3}{4}} {\left (8 \, \sqrt {2} + 11\right )} + 2 \cdot 2^{\frac {1}{4}} {\left (5 \, \sqrt {2} + 6\right )}\right )} e^{\left (2 \, x\right )} + 2^{\frac {3}{4}} {\left (2 \, \sqrt {2} + 1\right )} + 2 \cdot 2^{\frac {1}{4}} {\left (3 \, \sqrt {2} - 2\right )}\right )} \sqrt {-2 \, \sqrt {2} + 4} + \frac {1}{7} \, \sqrt {2} - \frac {3}{7}\right ) + \frac {1}{4} \cdot 2^{\frac {1}{4}} \sqrt {-2 \, \sqrt {2} + 4} \arctan \left (-\frac {1}{14} \, {\left (\sqrt {2} {\left (5 \, \sqrt {2} + 6\right )} + 8 \, \sqrt {2} + 4\right )} e^{\left (2 \, x\right )} + \frac {1}{28} \, {\left (2 \, \sqrt {2} {\left (5 \, \sqrt {2} + 6\right )} + {\left (2^{\frac {3}{4}} {\left (8 \, \sqrt {2} + 11\right )} + 2 \cdot 2^{\frac {1}{4}} {\left (5 \, \sqrt {2} + 6\right )}\right )} \sqrt {-2 \, \sqrt {2} + 4} + 16 \, \sqrt {2} + 8\right )} \sqrt {-{\left (2^{\frac {3}{4}} e^{\left (2 \, x\right )} + 2^{\frac {1}{4}} {\left (3 \, \sqrt {2} + 4\right )}\right )} \sqrt {-2 \, \sqrt {2} + 4} + 4 \, \sqrt {2} + e^{\left (4 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 5} - \frac {1}{14} \, \sqrt {2} {\left (3 \, \sqrt {2} - 2\right )} - \frac {1}{28} \, {\left ({\left (2^{\frac {3}{4}} {\left (8 \, \sqrt {2} + 11\right )} + 2 \cdot 2^{\frac {1}{4}} {\left (5 \, \sqrt {2} + 6\right )}\right )} e^{\left (2 \, x\right )} + 2^{\frac {3}{4}} {\left (2 \, \sqrt {2} + 1\right )} + 2 \cdot 2^{\frac {1}{4}} {\left (3 \, \sqrt {2} - 2\right )}\right )} \sqrt {-2 \, \sqrt {2} + 4} - \frac {1}{7} \, \sqrt {2} + \frac {3}{7}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [C] time = 0.21, size = 281, normalized size = 1.60 \[ -\left (\frac {1}{16} i + \frac {1}{16}\right ) \, \sqrt {2 \, \sqrt {2} - 2} {\left (-\frac {i}{\sqrt {2} - 1} + 1\right )} \log \left (\left (20 i + 10\right ) \, \sqrt {2} e^{\left (2 \, x\right )} + 10 \, \sqrt {2} \sqrt {10 \, \sqrt {2} + 14} + 50 \, \sqrt {2} - \left (2 i - 14\right ) \, \sqrt {10 \, \sqrt {2} + 14} + \left (28 i + 14\right ) \, e^{\left (2 \, x\right )} + 70\right ) + \left (\frac {1}{16} i + \frac {1}{16}\right ) \, \sqrt {2 \, \sqrt {2} - 2} {\left (-\frac {i}{\sqrt {2} - 1} + 1\right )} \log \left (\left (20 i + 10\right ) \, \sqrt {2} e^{\left (2 \, x\right )} - 10 \, \sqrt {2} \sqrt {10 \, \sqrt {2} + 14} + 50 \, \sqrt {2} + \left (2 i - 14\right ) \, \sqrt {10 \, \sqrt {2} + 14} + \left (28 i + 14\right ) \, e^{\left (2 \, x\right )} + 70\right ) - \left (\frac {1}{16} i + \frac {1}{16}\right ) \, \sqrt {2 \, \sqrt {2} + 2} {\left (-\frac {i}{\sqrt {2} + 1} + 1\right )} \log \left (2 \, \sqrt {2} e^{\left (2 \, x\right )} + 2 \, \sqrt {2} \sqrt {2 \, \sqrt {2} - 2} + \left (4 i + 2\right ) \, \sqrt {2} + \left (2 i - 2\right ) \, \sqrt {2 \, \sqrt {2} - 2} - 2 \, e^{\left (2 \, x\right )} - 4 i - 2\right ) + \left (\frac {1}{16} i + \frac {1}{16}\right ) \, \sqrt {2 \, \sqrt {2} + 2} {\left (-\frac {i}{\sqrt {2} + 1} + 1\right )} \log \left (2 \, \sqrt {2} e^{\left (2 \, x\right )} - 2 \, \sqrt {2} \sqrt {2 \, \sqrt {2} - 2} + \left (4 i + 2\right ) \, \sqrt {2} - \left (2 i - 2\right ) \, \sqrt {2 \, \sqrt {2} - 2} - 2 \, e^{\left (2 \, x\right )} - 4 i - 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.07, size = 37, normalized size = 0.21 \[ \frac {\left (\munderset {\textit {\_R} =\RootOf \left (2 \textit {\_Z}^{4}-2 \textit {\_Z}^{2}+1\right )}{\sum }\textit {\_R} \ln \left (2 \tanh \left (\frac {x}{2}\right ) \textit {\_R} +\tanh ^{2}\left (\frac {x}{2}\right )+1\right )\right )}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\cosh \relax (x)^{4} + 1}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.01, size = 205, normalized size = 1.16 \[ \frac {\sqrt {2}\,\sqrt {1-\mathrm {i}}\,\ln \left ({\mathrm {e}}^{2\,x}\,\left (436273152+91291648{}\mathrm {i}\right )+\sqrt {2}\,\sqrt {1-\mathrm {i}}\,\left (-9830400+56623104{}\mathrm {i}\right )+\sqrt {2}\,\sqrt {1-\mathrm {i}}\,{\mathrm {e}}^{2\,x}\,\left (218890240+149422080{}\mathrm {i}\right )+21168128+94306304{}\mathrm {i}\right )}{8}-\frac {\sqrt {2}\,\sqrt {1-\mathrm {i}}\,\ln \left ({\mathrm {e}}^{2\,x}\,\left (436273152+91291648{}\mathrm {i}\right )+\sqrt {2}\,\sqrt {1-\mathrm {i}}\,\left (9830400-56623104{}\mathrm {i}\right )+\sqrt {2}\,\sqrt {1-\mathrm {i}}\,{\mathrm {e}}^{2\,x}\,\left (-218890240-149422080{}\mathrm {i}\right )+21168128+94306304{}\mathrm {i}\right )}{8}+\frac {\sqrt {2}\,\sqrt {1+1{}\mathrm {i}}\,\ln \left ({\mathrm {e}}^{2\,x}\,\left (436273152-91291648{}\mathrm {i}\right )+\sqrt {2}\,\sqrt {1+1{}\mathrm {i}}\,\left (-9830400-56623104{}\mathrm {i}\right )+\sqrt {2}\,\sqrt {1+1{}\mathrm {i}}\,{\mathrm {e}}^{2\,x}\,\left (218890240-149422080{}\mathrm {i}\right )+21168128-94306304{}\mathrm {i}\right )}{8}-\frac {\sqrt {2}\,\sqrt {1+1{}\mathrm {i}}\,\ln \left ({\mathrm {e}}^{2\,x}\,\left (436273152-91291648{}\mathrm {i}\right )+\sqrt {2}\,\sqrt {1+1{}\mathrm {i}}\,\left (9830400+56623104{}\mathrm {i}\right )+\sqrt {2}\,\sqrt {1+1{}\mathrm {i}}\,{\mathrm {e}}^{2\,x}\,\left (-218890240+149422080{}\mathrm {i}\right )+21168128-94306304{}\mathrm {i}\right )}{8} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________